<%-- 
    Document   : adminViewPendingCompByYear
    Created on : Oct 21, 2013, 2:02:16 PM
    Author     : h10t93
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <p><h1>report pending compliants by year</h1></p>
    <form name="frm" method="POST">   
        <input type="text" name="txtyear"/>
        <input type="submit" value="view" onclick="frm.action='ManageServlet?action=reportPendingCompByYear'"/>
        <c:set var="total" scope="session" value="${sessionScope['totalCompPendingByYear']}"/>
        <p>Total complaints pending in Year : <c:out value="${total}"/></p>
        <br/>
        <table border="1">
            <tr>
                <th>Complaint ID</th>
                <th>User ID</th>
                <th>User Name</th>
                <th>User Department</th>
                <th>Category</th>
                <th>Technician Name</th>
                <th>Date Lodging</th>               
            </tr>
            <c:forEach var="p" items="${sessionScope['listPCByYear']}">
                <tr>
                    <td>${p.idComp}</td>
                    <td>${p.idUser}</td>
                    <td>${p.nameUser}</td>
                    <td>${p.department}</td>
                    <td>${p.compCategory}</td>
                    <td>${p.nameTechnician}</td>
                    <td>${p.dateLodging}</td>
                </tr>
            </c:forEach>
        </table>
    </form>
</body>
</html>
